﻿using System;

namespace DatabaseGroup.SSIS.SourceAdapters.View
{
    /// <summary>
    /// A handler for events associated with a numeric index
    /// </summary>
    /// <param name="sender">A reference to the sender of the event</param>
    /// <param name="e">An IndexEventArgs object</param>
    public delegate void IndexEventHandler(object sender, IndexEventArgs e);

    /// <summary>
    /// An event associated with a numeric index
    /// </summary>
    public class IndexEventArgs : EventArgs
    {
        /// <summary>
        /// Gets or sets the index the event is associated with
        /// </summary>
        public int Index { get; set; }

        /// <summary>
        /// Initializes a new instance of the IndexEventArgs class
        /// </summary>
        public IndexEventArgs()
        { }

        /// <summary>
        /// Initializes a new instance of the IndexEventArgs class
        /// using the index
        /// </summary>
        /// <param name="index">The index to associate with the event</param>
        public IndexEventArgs(int index)
        {
            this.Index = index;
        }
    }
}
